package chuishop.yiqimaicai.mapper;

import chuishop.yiqimaicai.pojo.Discounts;

import java.util.List;

public interface DiscountsMapper {

    /**
     * 查询所有优惠活动
     * @return
     */
    List<Discounts> findAllDiscounts();

    /**
     * 根据输入活动名查询
     * @param input
     * @return
     */
    List<Discounts> selectDiscountsByName(String input);

    /**
     * 添加优惠活动
     * @param discounts
     * @return
     */
    int addDiscounts(Discounts discounts);

    /**
     * 删除优惠活动
     * @param ids
     * @return
     */
    int deleteDiscounts(String[] ids);

    /**
     * 更新活动信息
     * @param discounts
     * @return
     */
    int updateDiscounts(Discounts discounts);

}
